Leaflet Map PolyUtil—多边形几何体的各种实用函数

Leaflet Map PolyUtil—多边形几何体的各种实用函数

多边形几何体的各种实用函数。

Functions

FunctionReturnsDescription
clipPolygon(<Point[]> points
<Boundsbounds,
 <Boolean> round?)
Point[]Clips the polygon geometry defined by the given points by the given bounds (using the Sutherland-Hodgman algorithm). Used by Leaflet to only show polygon points that are on the screen or near, increasing performance. Note that polygon points needs different algorithm for clipping than polyline, so there’s a separate method for it.
按给定边界裁剪由给定点定义的多边形几何体(使用Sutherland Hodgman算法)。由传单用于仅显示屏幕上或附近的多边形点,从而提高性能。请注意,多边形点需要与折线不同的裁剪算法,因此有一种单独的方法。
polygonCenter(<LatLng[] crs: CRS> latlngs)LatLngReturns the center (centroid) of the passed LatLngs (first ring) from a polygon.
返回从多边形传递的LatLngs(第一个环)的中心(质心)。
5 1 投票
文章评分
订阅评论
提醒
0 评论
最旧
最新 最多投票
内联反馈
查看所有评论
0
希望看到您的想法,请您发表评论x